﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using MM.DBUtility;
using MM.Model;
using MM.Common;

namespace MM.LibraryAPI.TOM
{
    public class OrderHelper
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="linkid"></param>
        /// <param name="mo_mr"></param>
        /// <param name="type"></param>
        /// <param name="mobile"></param>
        /// <param name="msg"></param>
        /// <param name="pid"></param>
        /// <param name="money"></param>
        /// <param name="status"></param>
        /// <param name="userid"></param>
        public static void ReceiveTomInfo(string linkid, string mo_mr, string type, string mobile, string msg, string pid,
            string money, string status, string userid)
        {
            SqlParameter[] parameters = { 
                    new SqlParameter("@linkid", SqlDbType.VarChar),
                    new SqlParameter("@mo_mr", SqlDbType.VarChar),
                    new SqlParameter("@type", SqlDbType.VarChar),
                    new SqlParameter("@mobile", SqlDbType.VarChar),
                    new SqlParameter("@msg", SqlDbType.VarChar),
                    new SqlParameter("@pid", SqlDbType.VarChar),
                    new SqlParameter("@money", SqlDbType.VarChar),
                    new SqlParameter("@status", SqlDbType.VarChar),
                    new SqlParameter("@userid", SqlDbType.VarChar),};
            parameters[0].Value = linkid;
            parameters[1].Value = mo_mr;
            parameters[2].Value = type;
            parameters[3].Value = mobile;
            parameters[4].Value = msg;
            parameters[5].Value = pid;
            parameters[6].Value = money;
            parameters[7].Value = status;
            parameters[8].Value = userid;

            DbHelperSql.ExecuteNonQuerySP(DbHelperSql.connectionString, "AddTomInfo", parameters);
        }
    }
}
